<template>
	<view>
		<view class="flex-between">
			<text class="font-40 font-weight-500">{{ title }}</text>
			<text style="background: #FEEAE8;color: #4D4D4D" class="font-28 w-128 h-48 radius-24 flex-center" @click="click">{{ text }}</text>
		</view>
		<slot></slot>
	</view>
</template>

<script>
	export default {
		props: {
			title: {
				type: String,
				default: ""
			},
			text: {
				type: String,
				default: ""
			},
			url: {
				type: String,
				default: ""
			}
		},
		data() {
			return {

			}
		},
		onLoad() {

		},
		methods: {
			click() {
				if (!this.isObjNone(this.user)) {
					this.toLogin()
				} else {
					if (this.url !== "") {
						this.jump(this.url)
					}
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	.earnings {
		background-color: #fff;

		.divider {
			width: 1rpx;
			height: 40rpx;
			background: #EEEEEE;
		}
	}
</style>
